<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="author" content="featon inc.">
    <link rel="stylesheet" href="/static/vendor/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/vendor/bootstrap/css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="/static/vendor/font-awesome/css/font-awesome.min.css">
    <link href="/static/vendor/jquery-easyui/themes/default/tree.css" rel="stylesheet">
    <link href="/static/vendor/jquery-easyui/themes/icon.css" rel="stylesheet">
    <link href="/static/vendor/jquery-ui/themes/base/jquery.ui.all.css" rel="stylesheet">
    <link rel="stylesheet" href="/static/vendor/skin/ftskin.css">

    <title></title>
</head>

<body style="margin-bottom: 60px;">
<div class="ft-subpage-wrapper container-fluid">

    <!-- 左导航开始	-->
    <div id="ftsidebar-subpage" style="overflow:auto;" class="">
        <div class="leftTree-box">
            <ul id="leftTree" class="easyui-tree" animate="true">

            </ul>
        </div>
    </div>
    <!-- 左导航结束	-->
    <input type="hidden" th:id="handle_name" th:value="${handle_name}" />
    <input type="hidden" th:id="dept_id" th:value="${dept_id}" />
    <input type="hidden" th:id="user_id" th:value="${user_id}" />
</div>
<div class="iframe-bottom-tools-box nav navbar-fixed-bottom">
    <button type="button" class="btn btn-info"  id="save_but"><span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span> 保存</button>
    <button type="button" class="btn btn-warning" onclick="modelWindow.closeFrameWindow();"><span class="glyphicon glyphicon-remove-circle" aria-hidden="true"></span> 取消</button>
</div>
<script src="/static/vendor/jquery/jquery-2.1.3.min.js"></script>
<script src="/static/vendor/bootstrap/js/bootstrap.min.js"></script>

<script src="/static/vendor/jquery-ui/minified/jquery-ui.min.js"></script>
<script src="/static/vendor/jquery-easyui/jquery.easyui.min.js"></script>

<link rel="stylesheet" href="/static/vendor/custom-scrollbar/jquery.mCustomScrollbar.min.css">

<script src="/static/vendor/skin/js/ft-ui.js"></script>
<script src="/static/vendor/skin/js/tree-util.js"></script>
<script src="/static/vendor/skin/js/java.js"></script>
<script src="/static/vendor/skin/js/jquery.c.js"></script>
<script>
    var handle_name = $("#handle_name").val();
    var dept_id = $("#dept_id").val();
    var user_id = $("#user_id").val();
    var frame_name = request.getParameter('frame_name');
    $(document).ready(function(){

        top.ajax.simple("/dept/getDeptTreeJsonStr/"+dept_id,{},setLeftMenuTreeJsonData);
        $('#save_but').click(fnSelect)
    });

    function fnSelect()
    {
        var node = $('#leftTree').tree('getSelected');
        if(node == null)
        {
            modelWindow.waring(top.CMSLang.selected_node);
            return;
        }else
        {

            eval("top.getCurrentFrameObj()."+handle_name+"('"+node.id+"')");
            modelWindow.closeFrameWindow();


            // var bean = top.ajax.getBean("com.featon.org.user.UserBean");
            // bean.user_id = user_id;
            // bean.dept_id = node.id;
            // if(top.ajax.synclBody("/sys/cs/org/user/export",bean))
            // {
            //     modelWindow.alert(top.CMSLang.Move_success);
            //     top.getCurrentFrameObj().loadListble();
            //     modelWindow.closeFrameWindow();
            // }else
            // {
            //     modelWindow.error(top.CMSLang.Move_fail);
            //     is_submit = false;
            // }


            /* if(frame_name != '' && frame_name != null)
                eval("top.getCurrentFrameObj('"+frame_name+"')."+handl_name+"('"+node.id+"','"+node.text+"')");
            else
                eval("top.getCurrentFrameObj()."+handl_name+"('"+node.id+"','"+node.text+"')");*/

        }
    }
</script>
</body>
</html>
